Skip to content

Fix administrative safety, reporting correctness, and PowerShell validation - #5

Merged
SecopsEngineer merged 3 commits into
mainfrom
fix/security-reliability-foundation
Oct 27, 2026
Merged

SecopsEngineer merged 3 commits into
mainfrom
fix/security-reliability-foundation

Conversation

@SecopsEngineer

Copy link
Copy Markdown
Owner

The collection contained scripts that could apply and immediately revert Exchange policies, copy privileged AD memberships without review, or produce incomplete and misleading reports. This change makes administrative actions explicit and previewable and fixes the reporting errors identified in the repository review.

Changes

  • Separate Exchange policy apply/restore; save prior assignments before changes, validate blocking policies, and verify organization and read-back results.
  • Preview AD group copying, skip protected groups by default, avoid duplicate additions, and verify successful writes. Replace the Defender menu with explicit actions and confirmation; remove the unsupported passive-mode registry toggle.
  • Honor AD domain and credential inputs, fix expiration filtering, obtain creator evidence from DC event 4720, and replace legacy WMI calls with CIM sessions that are always removed.
  • Modernize Graph reports to explicit tenant-checked sessions and selected properties. Distinguish unavailable retained sign-in data from never-used accounts.
  • Include NSG subscription identity, plural addresses/ports, ASGs and default rules; restore the caller's Azure context and stop appending reports across runs.
  • Replace browser database text scraping with read-only SQLite snapshots, actual records and UTC timestamps; fix local background jobs and include Edge and modern Firefox profiles.
  • Remove plaintext password parameters, automatic module installation, hardcoded environment values and inaccurate completion messages. Clean up unmanaged credential memory.
  • Give executable scripts .ps1 extensions, normalize repository documents, and add a catalog, examples, migration notes, contribution guidance and third-party provenance.
  • Add a read-only GitHub Actions workflow for Windows PowerShell and pwsh, pinned test dependencies and SQLite checksum verification, plus Actions dependency updates.

Validation

  • Windows PowerShell 5.1: parsing and PSScriptAnalyzer error/warning checks passed; 35/35 tests passed.
  • PowerShell 7.6.5: parsing and PSScriptAnalyzer error/warning checks passed; 35/35 tests passed.
  • Tests use fail-closed administrative mocks and synthetic Chrome/Firefox SQLite databases. No production AD, Azure, Graph, Exchange or Defender operations were performed.
  • Whitespace checks passed. Source files are UTF-8 with BOM for Windows PowerShell Unicode compatibility.

Compatibility and remaining validation

Script paths and parameters change; docs/Migration.md lists the mapping. Download the full checkout for shared helpers. Browser collection requires sqlite3 >= 3.33 on each target. The mailbox report distinguishes retention-processing pauses from preservation holds and does not resolve organization-wide retention coverage. The removed passive-mode action must be handled through supported OS-specific policy.

Controlled non-production validation is still needed for live roles, API behavior, remoting, policy propagation and managed Defender settings. Earlier third-party source redistribution terms remain unverified and are documented rather than silently relicensed. This draft does not merge changes into main.

@SecopsEngineer
SecopsEngineer marked this pull request as ready for review October 27, 2026 22:51
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T22:53:21.267150Z 66038aa Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SecopsEngineer
SecopsEngineer merged commit 9803498 into main Oct 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant